package com.openvas.service.impl;

import java.util.List;

import com.openvas.mapper.TableHostMapper;
import com.openvas.service.ITableHostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openvas.domain.TableHost;
import com.openvas.commons.common.core.text.Convert;

/**
 * 主键Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
@Service
public class TableHostServiceImpl implements ITableHostService
{
    @Autowired
    private TableHostMapper tableHostMapper;

    /**
     * 查询主键
     * 
     * @param assetId 主键主键
     * @return 主键
     */
    @Override
    public TableHost selectTableHostByAssetId(String assetId)
    {
        return tableHostMapper.selectTableHostByAssetId(assetId);
    }

    /**
     * 查询主键列表
     * 
     * @param tableHost 主键
     * @return 主键
     */
    @Override
    public List<TableHost> selectTableHostList(TableHost tableHost)
    {
        return tableHostMapper.selectTableHostList(tableHost);
    }

    /**
     * 新增主键
     * 
     * @param tableHost 主键
     * @return 结果
     */
    @Override
    public int insertTableHost(TableHost tableHost)
    {
        return tableHostMapper.insertTableHost(tableHost);
    }

    /**
     * 修改主键
     * 
     * @param tableHost 主键
     * @return 结果
     */
    @Override
    public int updateTableHost(TableHost tableHost)
    {
        return tableHostMapper.updateTableHost(tableHost);
    }

    /**
     * 批量删除主键
     * 
     * @param assetIds 需要删除的主键主键
     * @return 结果
     */
    @Override
    public int deleteTableHostByAssetIds(String assetIds)
    {
        return tableHostMapper.deleteTableHostByAssetIds(Convert.toStrArray(assetIds));
    }

    /**
     * 删除主键信息
     * 
     * @param assetId 主键主键
     * @return 结果
     */
    @Override
    public int deleteTableHostByAssetId(String assetId)
    {
        return tableHostMapper.deleteTableHostByAssetId(assetId);
    }
}
